package cool.taomu.toolkit.rpc.thrift.client.module

import com.google.inject.AbstractModule
import com.google.inject.TypeLiteral
import cool.taomu.toolkit.rpc.thrift.client.provider.ThritfTHshaClientProvider
import java.util.concurrent.ConcurrentHashMap
import org.apache.commons.pool2.impl.GenericObjectPool
import org.apache.thrift.transport.TTransport

class ThritfTHsHaClientModule extends AbstractModule {

	override configure() {
		bind(new TypeLiteral<ConcurrentHashMap<String, GenericObjectPool<TTransport>>>() {
		}).toProvider(ThritfTHshaClientProvider).asEagerSingleton;
	}
}
